package com.szpx.service.impl;

import com.szpx.entity.ZRZ.Jiaolian;
import com.szpx.mapper.JiaolianMapper;
import com.szpx.service.JiaolianService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class JiaolianServiceImpl implements JiaolianService {
    @Autowired
    private JiaolianMapper jiaolianMapper;

    @Override
    public Jiaolian getById(Integer id) {
        return jiaolianMapper.selectById(id);
    }

    @Override
    public List<Jiaolian> getAll() {
        return jiaolianMapper.selectAll();
    }

    @Override
    public boolean save(Jiaolian jiaolian) {
        return jiaolianMapper.insert(jiaolian) > 0;
    }

    @Override
    public boolean update(Jiaolian jiaolian) {
        return jiaolianMapper.update(jiaolian) > 0;
    }

    @Override
    public boolean delete(Integer id) {
        return jiaolianMapper.deleteById(id) > 0;
    }
    
}
